// Playground - noun: a place where people can play

//Nil Coalescing Operator

var userNickName:String?

userNickName = "liuxuanyi"

//if userNickName != nil
//{
//    println("Hello , \(userNickName!)")
//}
//else
//{
//    println("Hello , Guest")
//}

let outputName:String = userNickName != nil ? userNickName! : "Guest"
println("Hello , " + outputName)

let outputName1:String = userNickName ?? "Guest"
println("Hello , " + outputName1)


//区间

for index in 1..<10
{
    index
}

var courseNames = ["C1" , "C2" , "C3"]
for i in 0..<courseNames.count
{
    courseNames[i]
}
